package com.chenfan.magic.exception;

import com.chenfan.common.exception.ResultState;

/**
 * @author liuming
 * @date 2021-05-19 18:26
 */
public enum MagicState implements ResultState {

    /**
     * 返回错误码
     */
    NO_PRIVILEGE(160000, "您的菜单权限没有配置,请联系技术创新中心解决"),
    GET_PRIVILEGE_FAIL(160001, "权限菜单获取失败"),
    NO_OPERATION_PRIVILEGE(160002, "您没有此操作权限"),
    ;

    private int code;
    private String message;

    MagicState(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
